#!/bin/bash
#校验终端免密登录

error_exit(){
	echo "ERROR:校验终端免密登录失败"
	exit 1
}

sshIp=$1
sshNewUser=$2
port=$3
shellPath=$4

loginUser=`whoami`
echo "==========校验ssh免密登录开始=========="
expect ${shellPath}/shell/init/beetle_validate_ssh.sh ${sshIp} ${sshNewUser} ${loginUser} ${port} > /dev/null || error_exit
echo "==========校验ssh免密登录结束=========="
echo "success"
